<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="__static/lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="__static/css/public.css" media="all">
    <script typet="text/javascript" src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
</head>
<body>
<div class="layuimini-container layui-form">
    <div class="layuimini-main layui-row layui-col-space15">
        <div class="layui-col-xs6">
            <blockquote class="layui-elem-quote">
                <p><i class="fa fa-file-text"></i> 公司寄语</p>
            </blockquote>
            <textarea id="demo" style="display: none;">{$arr.company_wishes}</textarea>
        </div>
        <div class="layui-col-xs6">
            <blockquote class="layui-elem-quote">
                <p><i class="fa fa-file-text"></i> 公司语录</p>
            </blockquote>
            <textarea id="wb2" rows=15  placeholder="请输入公司语录,每一条语录请以‘*’结束" class="layui-textarea">{$arr.company_ana}</textarea>
            <div class="layui-form-mid layui-word-aux" style="color: red !important;">*重要提示：每一条语录请以<b>‘ * ’</b>结束</div>
        </div>

    </div>
    <hr />
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn "  lay-submit="" lay-filter="demo1">提交</button>
        </div>
    </div>
				
</div>
<script src="__static/lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script src="__static/js/man.js" charset="utf-8"></script>
<script>
    var form, table,layedit;
    layui.use(['table','layedit','form'], function () {
        table = layui.table, form = layui.form,layedit = layui.layedit;
        var wb1 = layedit.build('demo'); //建立编辑器
        form.on('submit(demo1)', function(data){
            var company_wishes = layedit.getContent(wb1);
            var company_ana = $('#wb2').val();
            
           
            layer.load(1, { shade : [ 0.5, '#676a6c' ] }); 
			$.post("{:url('seting')}?t=json",{company_wishes:company_wishes,company_ana:company_ana},function(data){
				layer.closeAll();
				if (data['code'] == 1) { 
                    layer.msg(data['msg'], { icon : 6 });
				} else {
					layer.msg(data['msg'], { icon : 5 });
				}
			}); 
            return false;
        })
    });

    
</script>
</body>
</html>
